package com.lfg.leetcode.leetcode300;

import java.util.HashMap;
import java.util.Map;


public class No304NumMatrix {
    public static void main(String[] args) {
        NumMatrix ret =new  NumMatrix(new int[][]{{3, 5, 6, 2, 5, 4, 19, 5, 6, 7, 12}});
//        int ret = lengthOfLIS(new int[]{1,3,6,7,9,4,10,5,6});
        System.out.println("[" + ret + "]");
    }

}
class NumMatrix {
    int[][] matrix = null;
    public NumMatrix(int[][] matrix) {
        this.matrix = matrix;
    }

    public int sumRegion(int row1, int col1, int row2, int col2) {
        int cnt = 0;
        for(int i=row1;i<=row2;i++){
            for (int j = col1; j <= col2; j++) {
                cnt += matrix[i][j];
            }
        }
        return cnt;

    }
}